/*
@author: lyf
@file: s.go
@time: 2022/10/14 16:23
*/
package main

import "fmt"

func main()  {
fmt.Println(sum(7))
}

func sum(n int) int{
	if n <= 2{
		return n
	}
	var a = 1
	var b = 2
	for i:=3;i<n;i++ {
		a,b = b,a+b
	}
	return b
}


